/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sql;

import java.sql.*;
/**
 *
 * @author Paula
 */
public class Sql {


  public static Connection getSqlConnection() throws Exception {
    String driver = "org.gjt.mm.mysql.Driver";
    String url = "jdbc:mysql://localhost/lmc logistics";
    String username = "root";
    String password = "pass";
    Class.forName(driver);
    Connection conn = DriverManager.getConnection(url, username, password);
    return conn;
  }

  public static void closeSqlConnection(Connection con) throws Exception
  {
            con.close();
  }
}